package cn.core.tool.context;

/**
 * 线程缓存
 */
public final class CoreContextData {

  private static final ThreadLocal<CurrentContextData> currentContextDataThreadLocal = new ThreadLocal<>();

  public static final CurrentContextData getCurrentContextData() {
    return (CurrentContextData) currentContextDataThreadLocal.get();
  }

  public static final void setCurrentContextData(CurrentContextData currentContextData) {
    currentContextDataThreadLocal.set(currentContextData);
  }

  public static final void removeCurrentContextData() {
    currentContextDataThreadLocal.remove();
  }

}
